<template>
	<view>
		<view style="background: linear-gradient(45deg, rgb(51, 136, 255) 0%, rgba(51, 136, 255, 0.8) 100%);">
			<view class="dp-userinfo2" style="background: url(https://yc.skmgw.cn/static/imgsrc/userinfobg.png) 0% 0% / cover no-repeat;
    margin: 0px;
    padding: 11px;
    height: 245px;">
				<view class="info">

					<view class="headimg">
						<ImagePreview :classstyle="'width:100%;height:100%;border-radius: 50%;'" :image.sync="mylist.wxProfileImg"
                          :url="mylist.wxProfileImg.indexOf('http')?'':imgurl"></ImagePreview>
					</view>

					<view class="nickname">

						<view class="nick"><text>{{mylist.userName}} </text>

						</view>

						<view style="display: flex;" v-if="mylist.isCertified">
							<view class="user-level" @tap="openLevelup" data-levelid="">
								<image class="level-img" src='/static/images/renzheng.png' />
								<view class="level-name">{{mylist.isCertified==0?'未认证':'已认证'}}</view>
							</view>
						</view>
					</view>
				</view>

				<view class="userset" @tap="gotomyset">
					<image src="/static/images/set.png" class="img" />
				</view>
			</view>
		</view>

		<view class="dp-userinfo-order" style="margin: -50px 11px 11px;
">
			<view class="head">
				<text class="f1">我的订单</text>
				<navigator class="f2" url="/pagesB/order/order"><text style="font-size: 25upx;">查看全部订单</text>
					<image src="/static/images/arrowright.png" class="image" />
				</navigator>
			</view>
		</view>

		<loading v-if="loading"></loading>
	</view>
</template>
<script>
	let videoAd = null;
	var app = getApp();
  export default {
		data() {
			return {
				textset: app.globalData.textset,
				platform: app.globalData.platform,
				pre_url: app.globalData.pre_url,
				task_banner: false,
				loading: false,
				choujiang_id: 0,
				sy_count: '',
				videoAd: '',
				imgurl: ''
			}
		},
		props: {
			params: {},
			data: {},
			mylist: {}
		},
		computed: {
			// ...mapState(['userId'])
		},
		created() {
			this.imgurl = app.globalData.imgUrl
		},
		methods: {
			gotomyset() {
				uni.navigateTo({
					url: '/pagesB/myset/myset'
				})
			},
			openLevelup: function(e) {
				/* var levelid = e.currentTarget.dataset.levelid
				if (parseInt(this.params.levelclick) !== 0) {
					app.goto('/pagesExt/my/levelinfo?id=' + levelid)
				} */
				uni.navigateTo({
					url: '/pagesB/shiming/shiming'
				})
			},
			// opencard: function(e) {
			// 	var cardId = e.currentTarget.dataset.card_id
			// 	var code = e.currentTarget.dataset.card_code
			// 	if (app.globalData.platform == 'mp') {
			// 		var jweixin = require('jweixin-module');
			// 		jweixin.openCard({
			// 			cardList: [{
			// 				cardId: cardId,
			// 				code: code
			// 			}],
			// 			success: function(res) {}
			// 		})
			// 	} else {
			// 		wx.openCard({
			// 			cardList: [{
			// 				cardId: cardId,
			// 				code: code
			// 			}],
			// 			success: function(res) {}
			// 		})
			// 	}

			// },

			weixinlogin: function(url) {
				uni.previewImage({
					// current: url,
					urls: [url]
				});
				// var that = this;
				// if (app.globalData.platform == 'wx' || app.globalData.platform == 'mp') {
				// 	app.authlogin(function(res) {
				// 		if (res.status == 1) {
				// 			app.success(res.msg);
				// 			var pages = getCurrentPages(); //获取加载的页面
				// 			var currentPage = pages[pages.length - 1]; //获取当前页面的对象
				// 			currentPage.$vm.getdata();
				// 		} else {
				// 			app.error(res.msg);
				// 		}
				// 	});
				// }
			},
			/*
			getdata(){
				var that  = this;
				if (app.globalData.platform == 'wx' && that.data.sysset.rewardedvideoad && !that.videoAd && wx.createRewardedVideoAd) {
					console.log('开始2');
					that.videoAd = wx.createRewardedVideoAd({
						adUnitId: that.data.sysset.rewardedvideoad
					});
					that.videoAd.onLoad(() => {})
					that.videoAd.onError((err) => {})
					that.videoAd.onClose(res2 => {
						that.isdoing = false;
						console.log(res2,'res');
					
						if (res2 && res2.isEnded) {
							console.log('开始走addRecord');
							that.toAddRecord();		
						} else {
							console.log('不走啊啊啊');
						}
					});
				}
			},
			*/

		}
	}
</script>
<style>
	.dp-userinfo {
		position: relative
	}

	.dp-userinfo .banner {
		width: 100%;
		margin-top: 120rpx;
		border-radius: 16rpx;
		background: #fff;
		padding: 0 20rpx 10rpx;
		color: #333;
		position: relative;
	}

	.dp-userinfo .banner .info {
		display: flex;
		align-items: flex-end
	}

	.dp-userinfo .banner .info .f1 {
		display: flex;
		flex-direction: column;
	}

	.dp-userinfo .banner .headimg {
		margin-top: -60rpx;
		width: 148rpx;
		height: 148rpx;

		margin-right: 20rpx;
		border: 3px solid #eee;
	}

	.dp-userinfo .banner .info {
		margin-left: 20rpx;
		display: flex;
		flex: auto;
	}

	.dp-userinfo .banner .info .nickname {

		min-width: 140rpx;
		max-width: 460rpx;
		text-align: center;
		height: 80rpx;
		line-height: 80rpx;
		font-size: 34rpx;
		font-weight: bold;
		max-width: 300rpx;
		overflow: hidden;
		white-space: nowrap;
	}

	.dp-userinfo .banner .getbtn {
		width: 120rpx;
		height: 44rpx;
		padding: 0 3px;
		line-height: 44rpx;
		font-size: 24rpx;
		background: #09BB07;
		color: #fff;
		position: absolute;
		top: 76rpx;
		left: 10rpx;
	}

	.dp-userinfo .banner .user-level {
		margin-left: 5px;
		color: #b48b36;
		background-color: #ffefd4;
		margin-top: 2px;
		width: auto;
		height: 36rpx;
		border-radius: 18rpx;
		padding: 0 20rpx;
		display: flex;
		align-items: center
	}

	.dp-userinfo .banner .user-level .level-img {
		width: 32rpx;
		height: 32rpx;
		margin-right: 3px;
		margin-left: -14rpx;
		border-radius: 50%;
	}

	.dp-userinfo .banner .user-level .level-name {
		font-size: 24rpx;
	}

	.dp-userinfo .banner .user-level image {
		border-radius: 50%;
	}

	.dp-userinfo .banner .usercard {
		position: absolute;
		right: 32rpx;
		top: 28rpx;
		width: 160rpx;
		height: 60rpx;
		text-align: center;
		border: 1px solid #FFB2B2;
		border-radius: 8rpx;
		color: #FC4343;
		font-size: 24rpx;
		font-weight: bold;
		display: flex;
		align-items: center;
		justify-content: center
	}

	.dp-userinfo .banner .usercard .img {
		width: 30rpx;
		height: 30rpx;
		margin-right: 8rpx;
		padding-bottom: 4rpx
	}

	.dp-userinfo .custom_field {
		display: flex;
		width: 100%;
		align-items: center;
		padding: 16rpx 8rpx;
		background: #fff
	}

	.dp-userinfo .custom_field .item {
		flex: 1;
		display: flex;
		flex-direction: column;
		justify-content: center;
		align-items: center
	}

	.dp-userinfo .custom_field .item .t1 {
		color: #666;
		font-size: 26rpx
	}

	.dp-userinfo .custom_field .item .t2 {
		color: #111;
		font-weight: bold;
		font-size: 36rpx;
	}

	.dp-userinfo .userset {
		width: 54rpx;
		height: 54rpx;
		padding: 10rpx;
		position: absolute;
		top: 40rpx;
		right: 30rpx
	}

	.dp-userinfo .userset .img {
		width: 100%;
		height: 100%
	}

	.dp-userinfo2 {
		width: 100%;
		height: 490rpx;
		display: flex;
		flex-direction: column;
		position: relative
	}

	.dp-userinfo2 .info {
		display: flex;
		margin-top: 100rpx;
		margin-left: 40rpx
	}

	.dp-userinfo2 .info .headimg {
		width: 108rpx;
		height: 108rpx;
		background: #fff;
		border: 3rpx solid rgba(255, 255, 255, 0.7);
		border-radius: 50%
	}

	.dp-userinfo2 .info .nickname {
		margin-left: 20rpx;
		display: flex;
		flex-direction: column;
		justify-content: center
	}

	.dp-userinfo2 .info .nickname .nick {
		display: flex;
		align-items: center;
		font-size: 36rpx;
		font-weight: bold;
		color: #fff;
		height: 60rpx;
		line-height: 60rpx;
		max-width: 400rpx;
		overflow: hidden;
		margin-right: 10rpx
	}

	.dp-userinfo2 .info .nickname .desc {
		font-size: 24rpx;
		color: rgba(255, 255, 255, 0.6);
		height: 40rpx;
		line-height: 40rpx
	}

	.dp-userinfo2 .info .nickname .user-level {
		color: rgba(255, 255, 255, 0.7);
		margin-top: 2px;
		width: auto;
		height: 36rpx;
		border-radius: 18rpx;
		padding: 0 20rpx;
		display: flex;
		align-items: center
	}

	.dp-userinfo2 .info .nickname .user-level .level-img {
		width: 32rpx;
		height: 32rpx;
		margin-right: 3px;
		margin-left: -14rpx;
		border-radius: 50%;
	}

	.dp-userinfo2 .info .nickname .user-level .level-name {
		font-size: 24rpx;
	}

	.dp-userinfo2 .info .nickname .usermid {
		color: rgba(255, 255, 255, 0.8);
		font-size: 24rpx;
	}

	.dp-userinfo2 .custom_field {
		display: flex;
		width: 100%;
		align-items: center;
		padding: 16rpx 8rpx;
		margin-top: 20rpx
	}

	.dp-userinfo2 .custom_field .item {
		flex: 1;
		display: flex;
		flex-direction: column;
		justify-content: center;
		align-items: center
	}

	.dp-userinfo2 .custom_field .item .t1 {
		color: rgba(255, 255, 255, 0.6);
		font-size: 24rpx;
		margin-top: 10rpx
	}

	.dp-userinfo2 .custom_field .item .t2 {
		color: #FFFFFF;
		font-weight: bold;
		font-size: 32rpx;
	}

	.dp-userinfo2 .usercard {
		width: 154rpx;
		height: 54rpx;
		background: #fff;
		border-radius: 27rpx 0 0 27rpx;
		display: flex;
		align-items: center;
		padding-left: 20rpx;
		position: absolute;
		top: 140rpx;
		right: 0
	}

	.dp-userinfo2 .usercard .img {
		width: 32rpx;
		height: 32rpx;
		margin-right: 6rpx
	}

	.dp-userinfo2 .usercard .txt {
		color: #F4504C;
		font-size: 24rpx;
		font-weight: bold
	}

	.dp-userinfo2 .userset {
		width: 54rpx;
		height: 54rpx;
		padding: 10rpx;
		position: absolute;
		top: 40rpx;
		right: 30rpx
	}

	.dp-userinfo2 .userset .img {
		width: 100%;
		height: 100%
	}

	.dp-userinfo-order {
		background: #fff;
		padding: 0 20rpx;
		border-radius: 16rpx;
		position: relative
	}

	.dp-userinfo-order .head {
		display: flex;
		align-items: center;
		width: 100%;
		padding: 16rpx 0;
	}

	.dp-userinfo-order .head .f1 {
		flex: auto;
		font-size: 30rpx;
		padding-left: 16rpx;
		font-weight: bold;
		color: #333
	}

	.dp-userinfo-order .head .f2 {
		display: flex;
		align-items: center;
		color: #999;
		width: 200rpx;
		padding: 10rpx 0;
		text-align: right;
		justify-content: flex-end
	}

	.dp-userinfo-order .head .f2 .image {
		width: 30rpx;
		height: 30rpx;
	}

	.dp-userinfo-order .head .t3 {
		width: 40rpx;
		height: 40rpx;
	}

	.dp-userinfo-order .content {
		display: flex;
		width: 100%;
		padding: 0 0 10rpx 0;
		align-items: center;
		font-size: 24rpx
	}

	.dp-userinfo-order .content .item {
		padding: 10rpx 0;
		flex: 1;
		display: flex;
		flex-direction: column;
		align-items: center;
		position: relative
	}

	.dp-userinfo-order .content .item .image {
		width: 50rpx;
		height: 50rpx
	}

	.dp-userinfo-order .content .item .iconfont {
		font-size: 60rpx
	}

	.dp-userinfo-order .content .item .t3 {
		padding-top: 3px
	}

	.dp-userinfo-order .content .item .t2 {
		display: flex;
		align-items: center;
		justify-content: center;
		background: red;
		color: #fff;
		border-radius: 50%;
		padding: 0 10rpx;
		position: absolute;
		top: 0px;
		right: 20rpx;
		width: 35rpx;
		height: 35rpx;
		text-align: center;
	}

	.parent {
		padding: 20rpx;
		border-radius: 16rpx;
		justify-content: center;
		display: flex;
		align-items: center;
		font-size: 24rpx;
		margin-bottom: 10rpx;
	}

	.parent .parentimg {
		width: 100rpx;
		height: 100rpx;
		border-radius: 50%;
		z-index: 10;
	}

	.parent .parentimg-tag {
		color: #fff;
		text-align: center;
		margin-top: -20rpx;
		z-index: 11;
		border-radius: 12rpx;
		padding: 2rpx 4rpx;
		position: relative;
		bottom: 2rpx;
	}

	.parent .copyicon {
		width: 26rpx;
		height: 26rpx;
		margin-left: 8rpx;
		position: relative;
		top: 4rpx;
	}

	.parent .f1 {
		position: relative;
	}

	.parent .f2 {
		padding: 0 30rpx;
	}

	.parent .handle-img {
		width: 60rpx;
		height: 60rpx;
	}

	.parent .btn-box {
		padding: 20rpx 0;
	}

	.parent button {
		padding: 0 40rpx;
		color: #fff;
		border-radius: 20rpx;
		line-height: 60rpx;
	}

	.qiuzhi-renzheng {
		color: #eeda65;
		background: #3a3a3a;
		border-radius: 8rpx;
		padding: 4rpx 8rpx;
		margin: 0 4rpx;
		font-size: 22rpx;
	}

	.qiuzhi-qianyue {
		color: #eeda65;
		background: #3a3a3a;
		border-radius: 8rpx;
		padding: 4rpx 8rpx;
		margin: 0 4rpx;
		font-size: 22rpx;
	}

	.zhaopin-renzheng {
		color: #eeda65;
		background: #3a3a3a;
		border-radius: 8rpx;
		padding: 4rpx 8rpx;
		margin: 0 4rpx;
		font-size: 22rpx;
	}

	.task_list {
		background: #fff;
		margin-top: 20rpx;
		padding: 0 20rpx;
		font-size: 30rpx;
		margin-bottom: 20rpx;
		border-radius: 16rpx;
		margin: 0px 11px 0;
	}

	.task_list .item {
		height: 100rpx;
		display: flex;
		align-items: center;
		border-bottom: 1px solid #eee
	}

	.task_list .item:last-child {
		border-bottom: 0;
		margin-bottom: 20rpx
	}

	.task_list .f1 {
		width: 50rpx;
		height: 50rpx;
		line-height: 50rpx;
		display: flex;
		align-items: center
	}

	.task_list .f1 image {
		width: 44rpx;
		height: 44rpx;
	}

	.task_list .f1 span {
		width: 40rpx;
		height: 40rpx;
		font-size: 40rpx
	}

	.task_list .f2 {
		color: #222
	}

	.task_list .f3 {
		color: #666;
		text-align: right;
		flex: 1
	}

	.task_list .f4 {
		width: 40rpx;
		height: 40rpx;
	}

	.back-jianbian {
		/* background: linear-gradient(45deg, rgb(51, 136, 255) 0%, rgba(51, 136, 255, 0.8) 100%); */
		background: linear-gradient(to right, blue, red);

	}
</style>